// 节流函数
export const useThrottle = (fn, time) => {
  let timer = null
  return function (...args) {
    if (!timer) {
      fn.apply(this, args)
      timer = setTimeout(() => {
        timer = null
      }, time)
    }
  }
}
